import networkx as nx

filename = 'edges.csv'
G = nx.DiGraph()
with open(filename) as file:
    for line in file:
        head, tail = [int(x) for x in line.split(',')]
        G.add_edge(head, tail)

pr = nx.pagerank(G)
print(pr)
